package kr.hkit.powerjava.chapter22.pro;

import java.util.HashSet;
import java.util.Set;

public class Lotto {
	public static void main(String[] args) {
		Set<Integer> set = new HashSet<>();
		
		int r = 0;
		
		while(set.size() < 6){
			r = (int) (Math.random() * 45 + 1);
			if(set.contains(r)){
				System.out.println("중복된 값 : " + r);
			}else{
				set.add(r);
			}
		}
		
		for(int a : set){
			System.out.print(a + "\t");
		}
	}
}
